Skip to content

Show only the reason on the fingerprint setup polkit prompt - #20972

Merged
dhh merged 2 commits into
quattrofrom
fingerprint-polkit-policy
Nov 30, 2026
Merged

dhh merged 2 commits into
quattrofrom
fingerprint-polkit-policy

Conversation

@dhh

@dhh dhh commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What changes

When starting fingerprint setup for the first time, the polkit dialog showed Authorize running command over the truncated /usr/share/omarchy/bin/omarchy-setup-s ... rint-enroll enroll right-index-finger command line.

  • Add default/polkit/org.omarchy.setup-security-fingerprint-enroll.policy for /usr/bin/omarchy-setup-security-fingerprint-enroll (argv1 = enroll) with <message>Set up fingerprint authentication</message>, so polkit prompts with just the single-line reason instead of a generic org.freedesktop.policykit.exec command line, while keeping arbitrary pkexec commands visible.
  • Update shell/plugins/panels/fingerprint/Enrollment.qml to invoke pkexec /usr/bin/omarchy-setup-security-fingerprint-enroll enroll <finger> when the policy and packaged helper are installed, and fall back to the helper on PATH with omarchy.polkit expect on dev checkouts that predate the policy.
  • Update shell/plugins/polkit/PolkitModel.js to translate the policy message through the existing fingerprint.authorize shell catalog key (all 50 languages), and fix matchesProgram() so bare program names still match when pkexec truncates inside the executable name itself.
  • Add regression tests in test/shell.d/polkit-test.sh.

Verification

  • Validated default/polkit/org.omarchy.setup-security-fingerprint-enroll.policy XML syntax and pkaction --verbose --action-id org.omarchy.setup-security-fingerprint-enroll.
  • Ran test/shell.d/polkit-test.sh, test/shell.d/fingerprint-panel-test.sh, test/shell.d/i18n-test.sh, and test/shell.d/qmllint-test.sh — all passed.
  • Verified live by installing the policy into /usr/share/polkit-1/actions/ and triggering pkexec /usr/bin/omarchy-setup-security-fingerprint-enroll enroll right-index-finger before fingerprint enrollment, confirming only the single-line Set up fingerprint authentication pill renders above the password card.

Screenshots

Before

Before

After

After

Add a polkit action for /usr/bin/omarchy-setup-security-fingerprint-enroll (argv1=enroll) so pkexec prompts with 'Set up fingerprint authentication' on a single line instead of showing the truncated command line, while keeping arbitrary pkexec commands visible.

Translate that policy message through the existing fingerprint.authorize catalog key, invoke the packaged helper path from Enrollment.qml (falling back to omarchy.polkit expect when the policy is not yet installed), and fix bare program matching in PolkitModel.js when pkexec truncates inside the executable name.
@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the checkout fallback is fixed and no new blocking issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the checkout fallback is fixed and no new blocking issues were found.

Summary

Fingerprint setup gets a dedicated polkit message, translated through the existing shell catalog.

  • Fingerprint setup prompts show the reason instead of a clipped command.
  • Long polkit prompts still match the right expected label.

The previous checkout enrollment finding is fixed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "Keep checkout helper on PATH when polkit..." · Reviewed by Greptile

@dhh
dhh merged commit 3556346 into quattro Nov 30, 2026
6 checks passed
@dhh
dhh deleted the fingerprint-polkit-policy branch November 30, 2026 19:47
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 30, 2026
…0972)

* Show only the reason on the fingerprint setup polkit prompt

Add a polkit action for /usr/bin/omarchy-setup-security-fingerprint-enroll (argv1=enroll) so pkexec prompts with 'Set up fingerprint authentication' on a single line instead of showing the truncated command line, while keeping arbitrary pkexec commands visible.

Translate that policy message through the existing fingerprint.authorize catalog key, invoke the packaged helper path from Enrollment.qml (falling back to omarchy.polkit expect when the policy is not yet installed), and fix bare program matching in PolkitModel.js when pkexec truncates inside the executable name.

* Keep checkout helper on PATH when polkit policy is not installed
lbssousa added a commit to lbssousa/polkit-omarchy that referenced this pull request Dec 1, 2026
upstream/ now holds shell/plugins/polkit/ from v4.6.0-rc2 (was main at
a30167e, the same files as 4.6.0-rc1), merged into plugin/ with
git merge-file and the old snapshot as the base, without conflicts:

- omacom/omarchy#20559: a Cancel pill under the card, revealed by moving
  the pointer or clicking the scrim; mouse selection and an I-beam in the
  password field.
- omacom/omarchy#20972: the fingerprint setup policy's message translated
  through the shell catalog, and pkexec prompts cut inside the
  executable's name matched against an expected label.

#20972's two new cases are ported to tests/PolkitModel.test.js.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant